package com.renting.modules.taskJob.service;

import com.renting.modules.taskJob.dao.JobDao;
import com.renting.modules.taskJob.entity.JobDetail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class JobService {


    @Autowired
    JobDao jobDao;

    public List<JobDetail> findAll() {
        List<JobDetail> list = new ArrayList<>();
        Iterable iterable = jobDao.findAll();
        iterable.forEach(jobAndTrigger -> list.add((JobDetail) jobAndTrigger));
        return list;
    }


}
